package com.lemon.smartsafetynew.ui.activity.air;

import android.os.Bundle;
import android.support.v4.app.Fragment;

import com.lemon.smartsafety.R;
import com.lemon.smartsafetynew.ui.activity.base.BaseFragmentActivity;
import com.lemon.smartsafetynew.entity.electrical.ElectricalCompanyVo;
import com.lemon.smartsafetynew.ui.fragment.air.AirListFragment;
import com.lemon.smartsafetynew.util.constants.KeyConstants;

/**
 * 实时监测 -- 可燃/有毒气体监测列表
 * Created by Andrew on 2018/3/17.
 */

public class AirListActivity extends BaseFragmentActivity {

    private static ElectricalCompanyVo companyVo = null;

    @Override
    protected void getBundleArgs() {
        super.getBundleArgs();

        Bundle bundle = getIntent().getExtras();
        if (bundle != null) {
            if(bundle.containsKey(KeyConstants.KEY_ELECTRICAL_COMPANY_INFO)) {
                companyVo = (ElectricalCompanyVo) bundle.getSerializable(KeyConstants.KEY_ELECTRICAL_COMPANY_INFO);
            }
        }
    }

    @Override
    public Fragment getFragment() {
        return AirListFragment.newInstance(companyVo);
    }

    @Override
    protected void initTitle() {
        this.setBarTitle(getString(R.string.real_monitor_air_str));
    }
}
